<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>伪元素实现土豆播放功能</title>
    <style>
        .a {
            position: relative;
            background-image: url(/案例/images/);
            margin: 100px auto;
            width: 800px;
            height: 500px;
        }
        
        img {
            width: 100%;
            position: absolute;
            height: 100%;
        }
        
        .a::before {
            content: '';
            z-index: 1;
            display: none;
            position: absolute;
            background: rgba(0, 0, 0, 0.4) url(images/arr.png) no-repeat center;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }
        
        .a:hover::before {
            display: block;
        }
    </style>

</head>

<body>


    <div class="a">
        <img src="../img/8d83794c16afa254c3e1f520f9c453bf8e8b4672.jpg">
    </div>



</body>

</html>